Skip to content

[Repo Assist] fix: filter compiler-generated types from Info Panel declared types list#2157

Draft
github-actions[bot] wants to merge 2 commits intomainfrom
repo-assist/fix-issue-1696-filter-compiler-generated-types-c83e0b16d12ae93c
Draft

[Repo Assist] fix: filter compiler-generated types from Info Panel declared types list#2157
github-actions[bot] wants to merge 2 commits intomainfrom
repo-assist/fix-issue-1696-filter-compiler-generated-types-c83e0b16d12ae93c

Conversation

@github-actions
Copy link
Contributor

🤖 This PR was created by Repo Assist, an automated AI assistant.

Closes #1696

Problem

The Info Panel's Declared Types section was showing compiler-generated implementation detail types when navigating assemblies that use async, iterator methods, or LINQ — for example Dapper's SqlMapper showed types like <>c__DisplayClass3_0 and (MoveNextAsync)d__1.

These types are generated by the .NET and F# compilers, are not part of the public API, and are never useful to a user browsing documentation in the Info Panel.

Fix

Added a client-side filter in src/Components/InfoPanel.fs to exclude types whose names are identified as compiler-generated:

  • Names that start with < → C#/.NET compiler convention: async state machines ((MethodName)d__0), display classes (<>c__DisplayClass), anonymous types (<>f__AnonymousType0), etc.
  • Names that contain @ → F# compiler convention: closure types (MatchClosure@123), computed expression types, etc.

User-defined generic types like MyType<'T> are not affected — their names don't start with <.

Alternatives considered

The upstream approach (filtering in FsAutoComplete using FSharpEntity.IsCompilerGenerated) would be more precise, but requires a coordinated FSAC release. The client-side filter is robust for all known naming conventions and an appropriate short-term fix.

Test Status

dotnet fable src --noCache — builds successfully, no new errors (pre-existing warnings only, unrelated to this change).

No automated tests exist for the Info Panel's rendering logic; verified the change is a pure additive list filter.

Generated by Repo Assist ·

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@d1d884596e62351dd652ae78465885dd32f0dd7d

Compiler-generated .NET types such as async state machines (<MethodName>d__0),
display classes (<>c__DisplayClass), and F# closure types (MatchClosure@123)
were appearing in the Info Panel's 'Declared Types' section when navigating
types from assemblies that use async/iterator methods or LINQ.

These types are identifiable by their names: compiler-generated names either
start with '<' (C#/.NET convention) or contain '@' (F# compiler convention).
User-defined generic types like MyType<'T> are not affected because their
names do not start with '<'.

Closes #1696

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Info Panel shouldn't include hidden/compiler-generated types

0 participants